<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

      

       <script>  
                
                let objData={
                 aa:1,
                 cc:"222",
                 objTwo:{
                     name:"xiaoming"
                 },
                 dfff:[1,5,6]
               }

             function depColen(objObj){
                 if(typeof objObj !=='object'){
                     return
                 } 
                 let objList=Array.isArray(objObj) ? []:{}
                 Object.keys(objObj).map(item=>{
                     if(objObj.hasOwnProperty(item)){
                         if(typeof objObj[item] =='object'){
                            objList[item]=depColen(objObj[item])
                         }else{
                            objList[item]=objObj[item]
                         }   

                     }
                  })
               

                 return objList
             }   

             let dataData=depColen(objData)
             dataData.dfff.push(999999)
             console.log(dataData)
             console.log(objData)




     

       </script>

</body>
</html>